package org.pageley.games.sanctuary.view;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.pageley.games.sanctuary.domain.entity.creature.Creature;
import org.pageley.games.sanctuary.domain.environment.Environment;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

public class EnvironmentController extends AbstractController {
	
	private Environment environment;
	private Creature player;

	public void setEnvironment(Environment environment) {
		this.environment = environment;
	}
	
    public void setPlayer(Creature player) {
		this.player = player;
	}

	public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView mav = new ModelAndView("environment");
       
        mav.addObject("environment", this.environment);
        mav.addObject("player", this.player);
        return mav;
    }
}